import Login from "../view/login/Login"
import Main from "../view/main/Main"
import Register from "../view/register/Register"
import Home from "../view/main/Home/Home"
import My from "../view/main/my/My"
import Create from "../view/create/Create"

export interface RouterItem{
    tit?:string,
    path:string,
    component?:any,
    redirect?:any,
    children?:RouterItem[]
}
let routes:RouterItem[]=[
    {
        path:"/main",
        component:Main,
        children:[
            {
                tit:"首页",
                path:"/main/home",
                component:Home
            },
            {
                tit:"我的",
                path:"/main/my",
                component:My
            },
            {
                path:"/main",
                redirect:"/main/home"
            }
        ]
    },
    {
        path:"/login",
        component:Login
    },
    {
        path:"/register",
        component:Register
    },
    {
        path:"/create",
        component:Create
    },
    {
        path:"/",
        redirect:"/main"
    }
]
export default routes